package flash.data;

extern class SQLConnection extends flash.events.EventDispatcher
{
	function analyze(resourceName:String = null, responder:flash.net.Responder = null):Void;
	function attach(name:String, reference:Dynamic = null, responder:flash.net.Responder = null, encryptionKey:flash.utils.ByteArray = null):Void;
	function begin(option:flash.data.SQLTransactionLockType = null, responder:flash.net.Responder = null):Void;
	function cancel(responder:flash.net.Responder = null):Void;
	function commit(responder:flash.net.Responder = null):Void;
	function compact(responder:flash.net.Responder = null):Void;
	function close(responder:flash.net.Responder = null):Void;
	function deanalyze(responder:flash.net.Responder = null):Void;
	function detach(name:String, responder:flash.net.Responder = null):Void;
	function getSchemaResult():flash.data.SQLSchemaResult;
	function loadSchema(type:Class<flash.data.SQLSchema> = null, name:String = null, database:String = "main", includeColumnSchema:Bool = true, responder:flash.net.Responder = null):Void;
	function open(reference:Dynamic = null, openMode:flash.data.SQLMode = flash.data.SQLMode.CREATE, autoCompact:Bool = false, pageSize:Int = 1024, encryptionKey:flash.utils.ByteArray = null):Void;
	function openAsync(reference:Dynamic = null, openMode:flash.data.SQLMode = flash.data.SQLMode.CREATE, responder:flash.net.Responder = null, autoCompact:Bool = false, pageSize:Int = 1024, encryptionKey:flash.utils.ByteArray = null):Void;
	function reencrypt(newEncryptionKey:flash.utils.ByteArray, responder:flash.net.Responder = null):Void;
	function releaseSavepoint(name:String = null, responder:flash.net.Responder = null):Void;
	function rollback(responder:flash.net.Responder = null):Void;
	function rollbackToSavepoint(name:String = null, responder:flash.net.Responder = null):Void;
	function setSavepoint(name:String = null, responder:flash.net.Responder = null):Void;
	var inTransaction(default, null):Bool;
	var totalChanges(default, null):Float;
	var lastInsertRowID(default, null):Float;
	var autoCompact(default, null):Bool;
	var pageSize(default, null):UInt;
	var cacheSize:UInt;
	var connected(default, null):Bool;
	var columnNameStyle:flash.data.SQLColumnNameStyle;
	function new():Void;
}